<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initView()
    {
        $view = new Zend_View();
        $view->doctype('XHTML1_STRICT');
        $view->headTitle('猫の家');
        
        Zend_Dojo::enableView($view);
        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        $viewRenderer->setView($view);

        return $view;
    }

    protected function _initNavigation()
    {
        $this->bootstrap('layout');
        $layout = $this->getResource('layout');
        $view = $layout->getView();
        $config = new Zend_Config_Xml(APPLICATION_PATH.'/configs/navigation.xml');
        $navigation = new Zend_Navigation($config);
        $view->navigation($navigation);
    }
    
    protected function _initSmarty() {
        require_once LIBRARY_PATH .'/MaoShen/View/Smarty.php';
        $smarty = new Maoshen_View_Smarty();
        $smarty->setScriptPath(APPLICATION_PATH.'/views/scripts');
        return $smarty;
    }
    
}

